import React from 'react';
import Icon from '@/components/Icon';

interface PreviewPros {
	imgUrl?: string;
	onClick?: () => void;
}

const Preview = (props: PreviewPros) => {
	const { imgUrl, onClick } = props;
	return (
		<div className="preview-container">
			<div className="content-box">
				<img src={imgUrl} alt="" />
			</div>
			<p className="icon-box">
				<Icon classname="icon-widget-guanbi colse" onClick={onClick} />
			</p>
		</div>
	);
};

export default Preview;
